package com.example.intermediateactivity.beans;

import com.example.intermediateactivity.R;

import java.util.ArrayList;
import java.util.List;

public class Dog {
    public int image;
    public String name;
    public String desc;

    public static int[] iconArray = {
            R.drawable.pic1,
            R.drawable.pic2,
            R.drawable.pic3,
            R.drawable.pic4,
    };
    public static String[] nameArray = {
            "哈士奇",
            "博美",
            "模样",
            "金毛",
    };
    public static String[] descArray = {
            "智慧的眼神，强壮的身躯，黑白相间的毛发，拆家的本领让人印象深刻，以前是雪地里拉雪橇的狗",
            "床前明月光，疑似地上霜，举头望明月，低头思故乡",
            "我不需要太多复杂的剧情，只想确定你会在我故事里。",
            "“离离原上草，一岁一枯荣。”这让我想起生命力顽强的小草。"
    };

    public static List<Dog> getDefaultList() {
        ArrayList<Dog> list = new ArrayList<>();
        for (int i = 0; i < nameArray.length; i++) {
            Dog dog = new Dog(
                    iconArray[i],
                    nameArray[i],
                    descArray[i]
            );
            list.add(dog);
        }

        return list;
    }

    public Dog(int image, String name, String desc) {
        this.image = image;
        this.name = name;
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "image=" + image +
                ", name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
